﻿using Estsh.Core.Base;
using Estsh.Core.Model.EnumUtil;
using Estsh.Core.Model.Extend.IFModels;
using Estsh.Core.Models;
using Estsh.Core.Repositories;
using Newtonsoft.Json.Linq;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Estsh.Core.Wms.IRepositories
{
    public interface IPullingRepository : IBaseRepository<WmsPullingGroup>
    {
        public List<MesWmsWorkOrder> GetProductionQueueInfo();
		public List<MesWmsWorkOrder_Extend> GetProductionQueueExtendInfo();
		/// <summary>
		/// 处理JIT生产队列
		/// </summary>
		/// <param name="mesWmsWorks"></param>
		/// <returns></returns>
		public bool InsertProductionQueueInfo(List<MesWmsWorkOrder> mesWmsWorks);
        /// <summary>
        /// 处理JIT生产队列-亿日
        /// </summary>
        /// <param name="mesWmsWorks"></param>
        /// <returns></returns>
        public bool InsertProductionQueueExtendInfo(List<MesWmsWorkOrder_Extend> mesWmsWorks);

		/// <summary>
		/// 根据拉动组类型获取拉动组信息
		/// </summary>
		/// <returns></returns>
		List<WmsPullingGroup> GetPullingGroupList(int pullType);
        /// <summary>
        /// 根据拉动数据
        /// </summary>
        /// <returns></returns>
        List<WmsMoveDetail> GetPullingPartList(string pullGroupCode,int workOrderType);

        /// <summary>
        /// 大件拣选拉动零件列表
        /// </summary>
        /// <param name="pullGroupCode"></param>
        /// <param name="workOrderType"></param>
        /// <returns></returns>
        public List<WmsPullingOrderDetail> GetPullingPickPartList(string pullGroupCode, int workOrderType);
        /// <summary>
        /// 获取待拉动数据--生产JIT数据给预测JIT拉动做补充
        /// </summary>
        /// <returns></returns>
        List<WmsMoveDetail> GetPullingPartList();

        /// <summary>
        /// 安全库存拉动
        /// </summary>
        /// <returns></returns>
        public List<SysLocatePart> SafetyPullList();

        public List<WmsMoveHeader> GetMoveHeaderWrong0();
        /// <summary>
        /// 根据产线ID获取产线库区关系信息
        /// </summary>
        /// <param name="pdlineId"></param>
        /// <returns></returns>
        public SysPdlineZone GetPdlineZone(int pdlineId);
        /// <summary>
        /// 根据订单号更新订单拉动状态
        /// </summary>
        /// <returns></returns>
        public int UpdateWorkOrder(string orderNo);
        /// <summary>
        /// 获取待拉动JIT订单数据
        /// </summary>
        /// <returns></returns>
        public List<MesWorkOrder> GetPullingJitOrderList();
    }
}
